package cn.tedu.medicalappointmentsystemk.dao.persist.mapper;

import cn.tedu.medicalappointmentsystemk.pojo.bo.AppointmentSelectBO;
import cn.tedu.medicalappointmentsystemk.pojo.bo.AppointmentSelectByUserIdBO;
import cn.tedu.medicalappointmentsystemk.pojo.po.AppointmentPO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;

import java.util.Date;
import java.util.List;

@Mapper
public interface AppointmentMapper extends BaseMapper<AppointmentPO> {

    AppointmentSelectByUserIdBO selectByUserId(Long id);

    Page<AppointmentSelectByUserIdBO> selectAppointmentsByUserId(Long id);

    Long selectAppointmentByCreateDate(Date createDate, Long patientId);

    Page<AppointmentSelectBO> selectList();

    Integer selectCountToday();

    Integer selectCountLastMonth();

    List<AppointmentSelectBO> selectByNickname(String nickname);

    Page<AppointmentSelectBO> searchLastWeek();

    Page<AppointmentSelectBO> searchLastMonth();

    Page<AppointmentSelectBO> searchToday();
}
